import {get, post} from "./axios"

// 商品分类列表
const giftSortList = async function(data) {
    const url = `/admin/giftSort/list`
    return await get(url, data)
}

// 编辑分类
const giftSortEdit = async function(data) {
    const url = `/admin/giftSort/edit`
    return await post(url, data)
}

// 编辑分类
const giftSortAdd = async function(data) {
    const url = `/admin/giftSort/add`
    return await post(url, data)
}

// 编辑分类
const giftSortDel = async function(data) {
    const url = `/admin/giftSort/batchEdit`
    return await post(url, data)
}

// 礼品列表
const getGiftList = async function(data) {
    const url = `/admin/Gift/list`
    return await get(url, data)
}

// 图片上传
const uploadImage = async function(data) {
    const url = `/activity/visitor/uploadimage`
    return await post(url, data)
}

// 添加礼品
const addGoods = async function(data) {
    const url = `/admin/gift/add`
    return await post(url, data)
}

// 编辑礼品
const editGoods = async function(data) {
    const url = `/admin/Gift/edit`
    return await post(url, data)
}

// 编辑礼品
const delGoods = async function(data) {
    const url = `/admin/Gift/batchEdit`
    return await post(url, data)
}

export {
    giftSortList,
    giftSortEdit,
    giftSortAdd,
    giftSortDel,
    getGiftList,
    uploadImage,
    addGoods,
    editGoods,
    delGoods
}
